package com.example.pixelyear;

import android.app.Application;
import android.content.Context;
import com.socks.library.KLog;

import java.lang.ref.WeakReference;

public class MyApp extends Application {
    private static boolean isDebug = false;
    private static WeakReference<Context> mContext;


    @Override
    public void onCreate() {
        super.onCreate();
        mContext = new WeakReference<>(getApplicationContext());
        KLog.init(isDebug());
    }

    public static Context getContext() {
        return mContext.get();
    }

    public static boolean isDebug() {
        return isDebug;
    }

}
